<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Dot - Bootstrap Agency Template</title>
  <meta content="width=device-width, initial-scale=1.0" name="viewport">
  <meta content="" name="keywords">
  <meta content="" name="description">

  <!-- Favicons -->
  <link href="/ks/img/favicon.png" rel="icon">
  <link href="/ks/img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic|Raleway:400,300,700" rel="stylesheet">

  <!-- Bootstrap CSS File -->
  <link href="/ks/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">

  <!-- Libraries CSS Files -->
  <link href="/ks/lib/icomoon/icomoon.css" rel="stylesheet">
  <link href="/ks/lib/animate/animate.css" rel="stylesheet">

  <!-- Main Stylesheet File -->
  <link href="/ks/css/style.css" rel="stylesheet">



    <!-- JavaScript Libraries -->
    <script src="/ks/lib/jquery/jquery.min.js"></script>
    <script src="/ks/lib/bootstrap/js/bootstrap.min.js"></script>
    <script src="/ks/lib/php-mail-form/validate.js"></script>
    <script src="/ks/lib/easing/easing.min.js"></script>

    <!-- Template Main Javascript File -->
    <script src="/ks/js/main.js"></script>





<#--------------------------------------------------------------------左右滑动-->





<#--------------------------------------------------------------------个人信息-->
    <link rel="stylesheet" href="/resources/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="/resources/bootstrap/style.css" />
    <link rel="stylesheet" href="/resources/easyUI/easyui.css">




    <script type="text/javascript" src="/resources/easyUI/jquery.easyui.min.js"></script>
    <script>
        $(function () {
            //弹框提示信息
            if("${tip}"){
                $.messager.show({
                    title:'添加用户',
                    msg:"<span style='color:red;'>${tip}</span>",
                    showType:'slide'
                });
            }

//            $("html, body").scrollTop(0).animate({scrollTop: $("#portfolio").offset().top});


        })

        function exit(){
            window.location = "/user/logout";                                       /*有第一个斜杆是前面是端口号，没有斜杠前面不知道会发生什么*/
        }

        function entry(id,studentId){
            if (confirm('你确定要开始考试吗，只有一次考试机会?')) {

                window.location = "/surface/entryTest?testPaperId="+id+"&studentId="+studentId;                                       /*有第一个斜杆是前面是端口号，没有斜杠前面不知道会发生什么*/

            }
        }


    </script>

</head>

<body data-spy="scroll" data-offset="58" data-target="#navbar-main">

  <div id="navbar-main">
    <!-- Fixed navbar -->
    <div class="navbar navbar-default navbar-fixed-top">
      <div class="container">

        <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav">

            <li><a href="#home" class="smoothscroll">封面</a></li>
            <li> <a href="#portfolio" class="smoothscroll"> 个人信息</a></li>
            <li> <a href="#blog" class="smoothscroll"> 试卷</a></li>
              <li><a href="javascript:exit();">退出</a></li>
        </div>
        <!--/.nav-collapse -->




      </div>
    </div>
  </div>

  <!-- ==== HEADERWRAP ==== -->
  <div id="home"></div>
  <div id="headerwrap" name="home">
    <header class="clearfix">
      <#--<h1><span class="icon icon-radio-checked"></span></h1>-->
          <h1><img src="/ks/img/gk4.jpg" height="100" width="100"></h1>
      <p>英语考试分班系统</p>
      <p>English Test Classifying System</p>
    </header>
  </div>
  <!-- /headerwrap -->
















  <!-- ==== PORTFOLIO ==== -->
  <div class="container" id="portfolio" name="portfolio">
    <br>
    <div class="row">
      <br>
      <h1 class="centered">我的个人信息</h1>
      <hr>
      <br>
      <br>
    </div>




  <#----------------------------------------------------------home个人信息-->
      <div class="container">
          <div class="row info-content">
              <form id="updateSelfForm" class="form-horizontal" method="post" action="/user/updateStudent" enctype="multipart/form-data" style="margin-top: 20px;">
                  <!-- 隐藏用户的id,修改用 -->
                  <input type="hidden"  name="id" value="${user_session.id}"/>

                  <div class="form-group">
                      <label class="col-sm-2 control-label">成绩</label>
                      <div class="col-sm-3">
                          <button class="btn" style="background: #11a9e2;color: #ffffff;" disabled="disabled" type="button">
                          ${user_session.score} <span class="badge"></span>
                          </button>
                      </div>
                      <label class="col-sm-2 control-label">班级</label>
                      <div class="col-sm-3">
                          <button class="btn" style="background: #11a9e2;color: #ffffff;" disabled="disabled" type="button">
                          ${user_session.team} <span class="badge"></span>
                          </button>
                      </div>
                  </div>

                  <div class="form-group">
                      <label class="col-sm-2 control-label">学号</label>
                     <div class="col-sm-3">
                          <button class="btn" style="background: #11a9e2;color: #ffffff;" disabled="disabled" type="button">
                          ${user_session.id} <span class="badge"></span>
                          </button>
                      </div>
                      <label class="col-sm-2 control-label">姓名</label>
                      <div class="col-sm-3">
                          <input id="username" name="username"  value="${user_session.username}" type="text" class="form-control" placeholder="请输入您的姓名">
                      </div>
                  </div>

                  <div class="form-group">
                      <label class="col-sm-2 control-label">座右铭</label>
                      <div class="col-sm-3">
                          <input id="note" name="note"  value="${user_session.note}" type="text" class="form-control" placeholder="请输入您的座右铭">
                      </div>
                      <label class="col-sm-2 control-label">密码</label>
                      <div class="col-sm-3">
                          <input type="password" id="password" name="password"
                                 value="${user_session.password}" class="form-control" placeholder="请输入您的密码">
                      </div>
                  </div>
                  <div class="form-group">
                      <label class="col-sm-2 control-label">头像</label>
                      <div class="col-sm-3">
                          <#--<img src="/upload/${user_session.imageLu}"  height="100">-->
                          <img src="/file/${user_session.imageLu}" height="100">
                      </div>
                      <label class="col-sm-2 control-label">修改头像</label>
                      <div class="col-sm-3">
                          <input placeholder="请选择头像" type="file" name="image"/>
                      </div>
                  </div>

                  <div class="form-group">
                      <label class="col-sm-2 control-label"></label>
                      <div class="col-sm-3">
                          <button type="submit" id="btn_submit"  class="btn btn-info"><span class="glyphicon glyphicon-edit"> 提交修改</span></button>
                      </div>
                  </div>


              </form>
          </div>
      </div>









      <!-- ==== PORTFOLIO ==== -->
      <div class="container" id="blog" name="blog">
          <br>
          <div class="row">
              <br>
              <h1 class="centered">试卷</h1>
              <p style="color: red" align="center">注意事项：只能选择一张做，按做的试卷的成绩来分班</p>
              <hr>
              <br>
              <br>
          </div>

          <#-----------------------------------做过试卷时显示--------------------------->
<h1 align="center">${alreadyTest}</h1>


      <#-----------------------------------没做试卷时显示--------------------------->
    <div class="container">
      <div class="row">

      <#list studentList as stu> <#--遍历stuList-->
        <!-- PORTFOLIO IMAGE 1 -->
        <div class="col-md-4 ">
          <div class="grid mask">
            <figure>

              <img class="img-responsive" src="/ks/img/portfolio/folio01.jpg" alt="">
              <figcaption>
                <h5>${stu.name}</h5>                                                                                      <#--名称-->
                <a data-toggle="modal" href="javascript:entry(${stu.id},${user_session.id});" class="btn btn-primary btn-lg">开始考试</a>           <#--去考试-->
              </figcaption>
              <!-- /figcaption -->
            </figure>
            <!-- /figure -->

          </div>
          <!-- /grid-mask -->
        </div>
        <!-- /col -->
      </#list>

      </div>

      </div>

      <#-----------------------------------选择了试卷时显示--------------------------->

          <#if onlyTestPaper!=null>


                  <div class="col-md-4 ">
                      <div class="grid mask">
                          <figure>

                              <img class="img-responsive" src="/ks/img/portfolio/folio01.jpg" alt="">
                              <figcaption>
                                  <h5>${onlyTestPaper.name}</h5>                                                                                      <#--名称-->
                                  <a data-toggle="modal" href="javascript:entry(${onlyTestPaper.id},${user_session.id});" class="btn btn-primary btn-lg">继续考试</a>           <#--去考试-->
                              </figcaption>
                              <!-- /figcaption -->
                          </figure>
                          <!-- /figure -->

                      </div>
                      <!-- /grid-mask -->
                  </div>
          </#if>
      <!-- /row -->

        <!-- /col -->
      </div>
      <!-- /row -->
      <br>
      <br>
    </div>
    <!-- /row -->
  </div>
  <!-- /container -->




</body>
</html>
